<template>
  <vue-friendly-iframe ref="iframe" class="iframe" :src="viewReportURL" />
</template>

<script>
export default {
  data() {
    return {
      viewReportURL: ''
    }
  },
  mounted() {
    var href1 = window.location.href
    var href2 = this.$route.path
    var url = href1.substring(0, href1.indexOf(href2))
    this.viewReportURL = url + '/viewReportSheet?reportId=' + this.$route.query.reportId
  }
}
</script>

<style scoped>
.iframe {
  margin:0;
  padding:0;
  position:absolute;
  width:100%;
  top: 0;
  bottom:0;
  left: 0;
}
</style>
